<template>
	<div class="dropdown-menu">
		<slot></slot>
	</div>
</template>

<script>
	export default {
		data() {
			return {
			}
		},
		mounted() {
			this.$on('close', this.closeDropdown)
		},
		methods: {
			closeDropdown() {
				this.$children.forEach(item =>{
					item.close();
				})
			}
		}
	}
</script>

<style lang="scss">
	.dropdown-menu {
		display: flex;
		justify-content: space-between;
		overflow: auto;
		white-space: nowrap;
		align-items: center;
		// border-bottom:2rpx solid #f8f8f8;
	}
	dropdown-item {
		flex: 1;
	}
</style>
